package com.services.impl;

import com.dao.IFlightDao;
import com.dao.impl.FlightDaoImpl;
import com.model.FlightModel;
import com.services.IFlightServices;

import java.util.List;

public class FlightServicesImpl implements IFlightServices {
    private IFlightDao flightDao = new FlightDaoImpl();

    @Override
    public List<FlightModel> getAllFlights() throws Exception {
        return flightDao.queryAllFlights();
    }

    @Override
    public List<FlightModel> searchFlights(String departureCity, String arrivalCity, String departureDate) throws Exception {
        return flightDao.searchFlights(departureCity, arrivalCity, departureDate);
    }
} 